package com.learn.project2.controller.wx.storage;

import com.learn.project2.model.vo.wx.storage.StorageCreateVO2;
import com.learn.project2.service.wx.storage.StorageService2;
import com.learn.project2.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @description:
 * @author 岳子昂
 * @date 2022-01-10 14:23
 * @version 1.0
 */
@RestController
@RequestMapping("wx/storage")
public class StorageController2 {

    @Autowired
    StorageService2 storageService2;
    /**
     * @description:
     * @param:
     * @return:
     * @author 岳子昂
     * @date: 2022-01-10 14:24
     */
    @RequestMapping("upload")
    public Result upload (MultipartFile file){
        StorageCreateVO2 storageCreateVO2 = storageService2.upload(file);
        return Result.ok(storageCreateVO2);
    }
}
